function nativeAlert() {
    function alertDismissed() {
        document.getElementById("alertInfo").innerHTML = "do something";
    }

    navigator.notification.alert(
        'You are the winner!',  // message
        alertDismissed,         // callback
        'Game Over',            // title
        'Done'                  // buttonName
    );
}

function nativeConfirm() {
    function onConfirm(buttonIndex) {
        alert('You selected button ' + buttonIndex);
    }

    navigator.notification.confirm(
        'You are the winner!', // message
        onConfirm,            // callback to invoke with index of button pressed
        'Game Over',           // title
        ['Restart','Exit']     // buttonLabels
    );
}

function nativePrompt() {
    function onPrompt(results) {
        alert("You selected button number " + results.buttonIndex + " and entered " + results.input1);
    }

    navigator.notification.prompt(
        'Please enter your name', // message
        onPrompt, // callback to invoke
        'Registration', // title
        ['Ok', 'Exit'], // buttonLabels
        'Jane Doe'                 // defaultText
    );
}